<template>
  <div class="scheme_list" v-if="state.schemOptions.scheme_name != null">
    <ListSearch />
    <div class="condition">
      <!-- <div class="condition_label">进场条件</div> -->
      <div class="condition_content">
        <div style="width: 104px; text-align: right">比赛时间：</div>
        <div>赛前进场时间</div>
        <div style="margin: 0 8px">
          <app-range-input
            :data="state.schemOptions[state.activefilterType.name]"
            :name1="`early_time_min`"
            :name2="`early_time_max`"
            style="width: 120px; height: 32px"
          />
        </div>
        <div>，上半场进场时间</div>
        <div style="margin: 0 8px">
          <app-range-input
            :data="state.schemOptions[state.activefilterType.name]"
            :name1="`first_half_time_min`"
            :name2="`first_half_time_max`"
            style="width: 120px; height: 32px"
          />
        </div>
        <div>，下半场进场时间</div>
        <div style="margin: 0 8px">
          <app-range-input
            :data="state.schemOptions[state.activefilterType.name]"
            :name1="`second_half_time_min`"
            :name2="`second_half_time_max`"
            style="width: 120px; height: 32px"
          />
        </div>
      </div>
    </div>
    <div style="height: calc(100% - 160px)">
      <el-scrollbar height="100%">
        <div class="scheme_body" style="position: relative">
          <el-collapse class="scheme_collapse" v-model="state.activeNames">
            <CollapseItem v-for="item2 in store.getcondition()" :key="item2.value" :data="item2" />
          </el-collapse>
        </div>
      </el-scrollbar>
    </div>
  </div>
</template>

<script setup>
import ListSearch from './ListSearch.vue'
import CollapseItem from './CollapseItem.vue'
import { onMounted } from 'vue'
const { store, state } = inject('Scheme')

const inputvalue = computed(() => {
  let a = {
    one: {
      value: state.schemOptions.first_half_time_min,
    },
    two: {
      value: state.schemOptions.first_half_time_max,
    },
  }
  return a
})
const inputvalue2 = computed(() => {
  let a = {
    one: {
      value: state.schemOptions.secondt_half_time_min,
    },
    two: {
      value: state.schemOptions.secondt_half_time_max,
    },
  }
  return a
})
const inputvalue3 = computed(() => {
  let a = {
    one: {
      value: state.schemOptions.early_time_min,
    },
    two: {
      value: state.schemOptions.early_time_max,
    },
  }
  return a
})


</script>

<style lang="scss" scoped>
.scheme_list {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.condition {
  display: flex;
  flex-direction: column;

  .condition_label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
  }

  .condition_content {
    margin-top: 0px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
  }
}
</style>

<style>
.condition_content .range_input {
  border-radius: 4px;
}
.condition_content .range_input input {
  font-size: 14px !important;
}

.scheme_collapse {
  margin-left: 32px;
  width: 988px;
  border: none;
  border: none;
}

.scheme_collapse .el-collapse-item__header,
.scheme_collapse .el-collapse-item__header.is-active {
  border-bottom: 1px solid#ebebeb !important;
}
.scheme_collapse .el-collapse-item__wrap {
  border: none;
}
.scheme_collapse .el-collapse-item__content {
  padding-bottom: 0;
}
</style>